﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Web;

/// <summary>
/// Summary description for Sessions
/// </summary>
public class Sessions
{
    public Sessions()
    {
    }


    #region Kullanıcı Bilgileri
    public static int KullaniciId
    {
        get
        {
            if (HttpContext.Current.Session["KullaniciId"] == null)
            {
                return -1;
            }

            else return (int)HttpContext.Current.Session["KullaniciId"];
        }
        set
        {
            HttpContext.Current.Session["KullaniciId"] = value;
        }
    }

    public static string KullaniciTipi
    {
        get
        {
            if (HttpContext.Current.Session["KullaniciTipi"] == null)
            {
                return "";
            }

            else return HttpContext.Current.Session["KullaniciTipi"].ToString();
        }
        set
        {
            HttpContext.Current.Session["KullaniciTipi"] = value;
        }
    } 
    #endregion

    #region Üye Bilgileri
    public static int UyeId
    {
        get
        {
            if (HttpContext.Current.Session["UyeId"] == null)
            {
                return -1;
            }

            else return (int)HttpContext.Current.Session["UyeId"];
        }
        set
        {
            HttpContext.Current.Session["UyeId"] = value;
        }
    }

    public static int ToptanMusterimi
    {
        get
        {
            if (HttpContext.Current.Session["ToptanMusterimi"] == null)
            {
                return -1;
            }

            else return (int)HttpContext.Current.Session["ToptanMusterimi"];
        }
        set
        {
            HttpContext.Current.Session["ToptanMusterimi"] = value;
        }
    }

    public static string Ad
    {
        get
        {
            if (HttpContext.Current.Session["Ad"] == null)
            {
                return "";
            }

            else return HttpContext.Current.Session["Ad"].ToString();
        }
        set
        {
            HttpContext.Current.Session["Ad"] = value;
        }
    }

    public static int Cinsiyet
    {
        get
        {
            if (HttpContext.Current.Session["Cinsiyet"] == null)
            {
                return -1;
            }

            else return (int)HttpContext.Current.Session["Cinsiyet"];
        }
        set
        {
            HttpContext.Current.Session["Cinsiyet"] = value;
        }
    }

    public static string EPosta
    {
        get
        {
            if (HttpContext.Current.Session["EPosta"] == null)
            {
                return "";
            }

            else return HttpContext.Current.Session["EPosta"].ToString();
        }
        set
        {
            HttpContext.Current.Session["EPosta"] = value;
        }
    } 
    #endregion

    public static string GuvenlikKodu
    {
        get
        {
            if (HttpContext.Current.Session["GuvenlikKodu"] == null)
            {
                return "";
            }

            else return HttpContext.Current.Session["GuvenlikKodu"].ToString();
        }
        set
        {
            HttpContext.Current.Session["GuvenlikKodu"] = value;
        }
    }

    public static DataRow SiparisFiyati
    {
        get
        {
            if (HttpContext.Current.Session["SiparisFiyati"] == null)
            {
                return null;
            }

            else return (DataRow)HttpContext.Current.Session["SiparisFiyati"];
        }
        set
        {
            HttpContext.Current.Session["SiparisFiyati"] = value;
        }
    }

    public static int BegeniAdedi
    {
        get
        {
            if (HttpContext.Current.Session["BegeniAdedi"] == null)
            {
                return 0;
            }

            else return (int)HttpContext.Current.Session["BegeniAdedi"];
        }
        set
        {
            HttpContext.Current.Session["BegeniAdedi"] = value;
        }
    }

    public static int SepetAdedi
    {
        get
        {
            if (HttpContext.Current.Session["SepetAdedi"] == null)
            {
                return 0;
            }

            else return (int)HttpContext.Current.Session["SepetAdedi"];
        }
        set
        {
            HttpContext.Current.Session["SepetAdedi"] = value;
        }
    }

    public static int FaturaAdresi
    {
        get
        {
            if (HttpContext.Current.Session["FaturaAdresi"] == null)
            {
                return -1;
            }

            else return (int)HttpContext.Current.Session["FaturaAdresi"];
        }
        set
        {
            HttpContext.Current.Session["FaturaAdresi"] = value;
        }
    }

    public static int TeslimatAdresi
    {
        get
        {
            if (HttpContext.Current.Session["TeslimatAdresi"] == null)
            {
                return -1;
            }

            else return (int)HttpContext.Current.Session["TeslimatAdresi"];
        }
        set
        {
            HttpContext.Current.Session["TeslimatAdresi"] = value;
        }
    }

    public static int HizliAdet
    {
        get
        {
            if (HttpContext.Current.Session["HizliAdet"] == null)
            {
                return 1;
            }

            else return (int)HttpContext.Current.Session["HizliAdet"];
        }
        set
        {
            HttpContext.Current.Session["HizliAdet"] = value;
        }
    }

}